<?php
	/**
	 * Raw resource.
	 * @author IMP
	 */
	
	class RawResource implements Resource {
		private $content;
		
		public function __construct($content = ''){
			$this->content = $content;
		}
		
		public function getContent(){
			return $this->content;
		}
		
		public function setContent($content){
			$this->content = $content;
		}
		
		public function __toString(){
			return $this->content;
		}
		
		public function save(File $f){
			$f->write($this->content);
		}
		
		public static function formFilename($name){
			return $name;
		}
		
		public static function open(File $f){
			return new self($f->read());
		}
	}
?>